﻿using System;
using Business;

namespace TimeWork.time.admin
{
    public partial class ProjectTree : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["email"] == null)
            {
                Response.Redirect("http://"+Request.Url.Authority+"/Login.aspx");
            }
            if (!IsPostBack)
            {
                LoadGrid();
            }
        }

        private void LoadGrid()
        {
            ltrGridProjectTree.Text = BuProject.selProjectByParentID(Session["companyid"].ToString());
        }

        protected void btnAdd_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/time/admin/EditProjectTree.aspx");
        }
    }
}